



var MoreGamesButton = function (e) {
    function t(t, n, r, i) {
        var s = this;
        e.call(this);
        this.initScale = i;
        var o = !needMoreGames ? null : App.game.preloader.hasMoreGames ? createSpriteFromSpritesheet("more") : null;
        if (o) {
            o.scaleX = o.scaleY = i;
            o.x = n;
            o.y = r;
            o.pivotX = o.getBounds().width / 2;
            o.pivotY = o.getBounds().height / 2;
            o.mouseEnabled = false;
            t.addChild(o);
            if (apiInstance && apiInstance.Branding.getLink("more_games").action)
                this.callback = function () {
                    return s.onLogoClick();
                };
        }
        this.sprite = o;
    }
    __extends(t, e);
    t.prototype.onLogoClick = function () {
        if (!this.sprite)
            return;
        if (apiInstance && apiInstance.Branding.getLink("more_games").action)
            apiInstance.Branding.getLink("more_games").action();
        createjs.Tween.get(this.sprite, {
            loop: false
        }).wait(0).to({
            scaleX: 1.2 * this.initScale,
            scaleY: 1.2 * this.initScale,
            alpha: 1
        }, 200, createjs.Ease.circOut).wait(0).to({
            scaleX: this.initScale,
            scaleY: this.initScale
        }, 250, createjs.Ease.circIn);
    };
    t.prototype.checkClick = function (e, t) {
        if (this.sprite) {
            var n = this.sprite.getBounds();
            var r = this.sprite.localToGlobal(0, 0);
            var i = this.initScale * n.width;
            var s = this.initScale * n.height;
            return e >= r.x && e <= r.x + i && t >= r.y && t <= r.y + s;
        }
        return false;
    };
    return t;
}
(ClickableObject);

